﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TransactionHis.ascx.cs" Inherits="Admin_Components_Report_TransactionHis" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<telerik:RadScriptManager ID="ScriptManager2" runat="server" EnableTheming="True">
</telerik:RadScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <telerik:RadTabStrip ID="TabStrip1" runat="server" EnableDragToReorder="true" Skin="Vista" MultiPageID="RadMultiPag1" >
            <Tabs>
                 <telerik:RadTab Text="TÌM KIẾM" Selected="True">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
       
        <telerik:RadMultiPage ID="RadMultiPag1" runat="server" SelectedIndex="0">
            <!--Tab thông tin chung -->
            <telerik:RadPageView ID="RadPageView1" runat="server" Height="135px" Style="overflow: hidden">
                 <fieldset class="form" id="fsGeneral">
                     <br />
               <div class="form-horizontal wrapper-center clearfix">
                <!--Block bên trái -->
                 <div class="form-group col-md-6">
                     <div class="form-group">
                    <label class="col-md-4 control-label">Tỉnh thành</label>
                    <div class="col-md-8">
                        <telerik:RadComboBox ID="cboProvince" runat="server" CssClass="col-imp-8" OnSelectedIndexChanged="cboProvince_SelectedIndexChanged" AutoPostBack="true">  
                        </telerik:RadComboBox>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-4 control-label">Cửa hàng</label>
                        <div class="col-md-8">
                            <telerik:RadComboBox ID="cboShop" runat="server" CssClass="col-imp-8"  />
                         </div>
                    </div>
                    <div class="form-group">
                    <label class="col-md-4 control-label">Sản phẩm</label>
                    <div class="col-md-8">
                        <telerik:RadComboBox ID="cboProduct" runat="server" CssClass="col-imp-8"  filter="Contains"/>
                        </div>
                    </div>
                </div>
                 <!--End Block bên trái -->
                 <!--Block bên phải -->
                <div class="form-group col-md-6">
                      <div class="form-group">
                        <label class="col-md-3 control-label">
                            Từ ngày</label>
                        <div class="col-md-8">
                        <telerik:RadDatePicker ID="dtpFromDate" cssclass="col-imp-8" enabled="true" runat="server">
                            <Calendar ID="Calendar1" runat="server" EnableKeyboardNavigation="true" ViewSelectorText="x" Skin="Hay" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False">
                            </Calendar>
                            <DateInput ToolTip="Từ ngày" style="width:100px" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"></DateInput>
                        </telerik:RadDatePicker>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            Đến ngày</label>
                        <div class="col-md-8">
                        <telerik:RadDatePicker ID="dtpToDate" cssclass="col-imp-8" enabled="true" runat="server">
                            <Calendar ID="Calendar2" runat="server" EnableKeyboardNavigation="true" ViewSelectorText="x" Skin="Hay" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False">
                            </Calendar>
                            <DateInput ToolTip="Đến ngày" style="width:100px" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"></DateInput>
                        </telerik:RadDatePicker>
                        </div>
                    </div>
                     <div class="form-group">
                    <label class="col-md-3 control-label">Loại bao</label>
                    <div class="col-md-8">
                        <telerik:RadComboBox ID="cboPackType" runat="server" CssClass="col-imp-5"  filter="Contains"/>
                     </div>
                    </div>
                </div>
                 <!--End Block bên phải -->
                </div>
            </fieldset>
            </telerik:RadPageView>
        </telerik:RadMultiPage>
        <!--Action-->
        <div class="set-btns text-center">
            <asp:Button ID="btnSearch" CssClass="btn btn-sm btn-primary" runat="server" Text="Tìm kiếm" OnClick="btnSearch_Click"/>
            <asp:Button ID="btnExportExcel" runat="server" CssClass="btn btn-sm btn-primary" Text="Xuất Excel" OnClick="btnExportExcel_Click"/>
        </div>
        <div class="row">
            <telerik:RadGrid ID="gv" runat="server" AutoGenerateColumns="False" CellSpacing="0" PageSize="50" AllowCustomPaging="true"
                    AllowMultiRowSelection="True" GridLines="None" HeaderStyle-HorizontalAlign="Center" OnNeedDataSource="gvData_NeedDataSource"
                    HeaderStyle-BorderStyle="None" CssClass="table table-bordered" >
                    <MasterTableView EditMode="InPlace" ShowHeader="true"
                        AutoGenerateColumns="False" NoMasterRecordsText="Không có dữ liệu." ShowGroupFooter="true" AllowPaging="True" PageSize="50" >
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                        </ExpandCollapseColumn>
                        <Columns>
                         <telerik:GridTemplateColumn HeaderText="STT" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <%# Eval("RowID") %>
                            </ItemTemplate>
                            <HeaderStyle Width="50px" />
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridTemplateColumn>
                         <telerik:GridBoundColumn  DataField="ShopName" UniqueName="ShopName"  ReadOnly="true" HeaderText="Tên cửa hàng">
                            <HeaderStyle HorizontalAlign="Center" Width="150px"/>
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn  DataField="ProductName" UniqueName="ProductName"  ReadOnly="true" HeaderText="Tên sản phẩm">
                            <HeaderStyle HorizontalAlign="Center"  Width="300px" />
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn  DataField="Type" UniqueName="Type" ReadOnly="true" HeaderText="Loại giao dịch">
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>
                         <telerik:GridBoundColumn  DataField="TotalWeight" UniqueName="TotalWeight" DataFormatString="{0:N0}"  ReadOnly="true" HeaderText="Trọng lượng(Kg)">
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center"/>
                        </telerik:GridBoundColumn>
                         <telerik:GridBoundColumn  DataField="TotalQty" UniqueName="TotalQty" DataFormatString="{0:N0}"  ReadOnly="true" HeaderText="Số lượng">
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
               </telerik:RadGrid>
        </div>
    </ContentTemplate>
<Triggers>
    <asp:PostBackTrigger ControlID="btnExportExcel"/>
</Triggers>
</asp:UpdatePanel>
<div class="progressbar">
    <asp:UpdateProgress ID="up" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <div class="bg">
                <div class="progress progress-striped active">
                    <div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0"
                        aria-valuemax="100" style="width: 100%">
                        <span class="sr-only">100% Complete</span>
                    </div>
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</div>
